﻿Imports System.IO
Imports SecretaryToolData
Imports iTextSharp.text
Imports iTextSharp.text.pdf

Partial Public Class Reports
	'http://www.mikesdotnetting.com/Article/89/iTextSharp-Page-Layout-with-Columns

	Public Shared Function GenerateStatsReport() As FileInfo

		Dim OutputFile As New FileInfo(String.Format("{0}\{1}.{2}", ConfigPropertyKeys.AutoBackupLocation, "Congregation Stats".AppendFileDateExtension, "pdf"))

		Using myFileStream As New FileStream(OutputFile.FullName, FileMode.Create, FileAccess.Write)
			Using myDoc As New Document(PageSize.LETTER)
				Dim writer As PdfWriter = PdfWriter.GetInstance(myDoc, myFileStream)

				myDoc.Open()
				'write report header
				Dim content As PdfContentByte = writer.DirectContent

				Dim threeMonthAverageLabel As String = "3 Mon. Avg"
				Dim sixMonthAverageLabel As String = "6 Mon. Avg"
				Dim twelveMonthAverageLabel As String = "12 Mon. Avg"

				Dim column As New SimpleColumnText(content, 2, 5, myDoc)

				Dim elderTable As New PdfPTable(7)
				elderTable.KeepTogether = True
				elderTable.WidthPercentage = 100

				Dim elderTitleCell As New PdfPCell(New Phrase(String.Format("Elders: {0}", VM_Stats.ElderTotals.Count), fontSectionLabel))
				elderTitleCell.Colspan = 7
				elderTable.AddCell(elderTitleCell)

				elderTable.AddCell(" ")
				elderTable.AddCell(PrettyCell("Bks."))
				elderTable.AddCell(PrettyCell("Broch."))
				elderTable.AddCell(PrettyCell("Hrs."))
				elderTable.AddCell(PrettyCell("Mag."))
				elderTable.AddCell(PrettyCell("RVs"))
				elderTable.AddCell(PrettyCell("Studies"))

				elderTable.AddCell(threeMonthAverageLabel)
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.threeMonthBooksAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.threeMonthBrochuresAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.threeMonthHoursAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.threeMonthMagazinesAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.threeMonthReturnVisitsAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.threeMonthBibleStudiesAverage))

				elderTable.AddCell(sixMonthAverageLabel)
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.sixMonthBooksAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.sixMonthBrochuresAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.sixMonthHoursAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.sixMonthMagazinesAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.sixMonthReturnVisitsAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.sixMonthBibleStudiesAverage))

				elderTable.AddCell(twelveMonthAverageLabel)
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.twelveMonthBooksAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.twelveMonthBrochuresAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.twelveMonthHoursAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.twelveMonthMagazinesAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.twelveMonthReturnVisitsAverage))
				elderTable.AddCell(PrettyCell(VM_Stats.ElderTotals.twelveMonthBibleStudiesAverage))

				column.AddElement(elderTable)

				column.AddElement(New Paragraph(" "))

				Dim ministerialServantTable As New PdfPTable(7)
				ministerialServantTable.KeepTogether = True
				ministerialServantTable.WidthPercentage = 100

				Dim ministerialServantTitleCell As New PdfPCell(New Phrase(String.Format("Ministerial Servants: {0}", VM_Stats.MinisterialServantTotals.Count), fontSectionLabel))
				ministerialServantTitleCell.Colspan = 7
				ministerialServantTable.AddCell(ministerialServantTitleCell)

				ministerialServantTable.AddCell(" ")
				ministerialServantTable.AddCell(PrettyCell("Bks."))
				ministerialServantTable.AddCell(PrettyCell("Broch."))
				ministerialServantTable.AddCell(PrettyCell("Hrs."))
				ministerialServantTable.AddCell(PrettyCell("Mag."))
				ministerialServantTable.AddCell(PrettyCell("RVs"))
				ministerialServantTable.AddCell(PrettyCell("Studies"))

				ministerialServantTable.AddCell(threeMonthAverageLabel)
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.threeMonthBooksAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.threeMonthBrochuresAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.threeMonthHoursAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.threeMonthMagazinesAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.threeMonthReturnVisitsAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.threeMonthBibleStudiesAverage))

				ministerialServantTable.AddCell(sixMonthAverageLabel)
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.sixMonthBooksAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.sixMonthBrochuresAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.sixMonthHoursAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.sixMonthMagazinesAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.sixMonthReturnVisitsAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.sixMonthBibleStudiesAverage))

				ministerialServantTable.AddCell(twelveMonthAverageLabel)
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.twelveMonthBooksAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.twelveMonthBrochuresAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.twelveMonthHoursAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.twelveMonthMagazinesAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.twelveMonthReturnVisitsAverage))
				ministerialServantTable.AddCell(PrettyCell(VM_Stats.MinisterialServantTotals.twelveMonthBibleStudiesAverage))

				column.AddElement(ministerialServantTable)

				column.AddElement(New Paragraph(" "))

				Dim pioneerTable As New PdfPTable(7)
				pioneerTable.KeepTogether = True
				pioneerTable.WidthPercentage = 100

				Dim pioneerTitleCell As New PdfPCell(New Phrase(String.Format("Pioneers: {0}", VM_Stats.PioneerTotals.Count), fontSectionLabel))
				pioneerTitleCell.Colspan = 7
				pioneerTable.AddCell(pioneerTitleCell)

				pioneerTable.AddCell(" ")
				pioneerTable.AddCell(PrettyCell("Bks."))
				pioneerTable.AddCell(PrettyCell("Broch."))
				pioneerTable.AddCell(PrettyCell("Hrs."))
				pioneerTable.AddCell(PrettyCell("Mag."))
				pioneerTable.AddCell(PrettyCell("RVs"))
				pioneerTable.AddCell(PrettyCell("Studies"))

				pioneerTable.AddCell(threeMonthAverageLabel)
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.threeMonthBooksAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.threeMonthBrochuresAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.threeMonthHoursAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.threeMonthMagazinesAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.threeMonthReturnVisitsAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.threeMonthBibleStudiesAverage))

				pioneerTable.AddCell(sixMonthAverageLabel)
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.sixMonthBooksAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.sixMonthBrochuresAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.sixMonthHoursAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.sixMonthMagazinesAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.sixMonthReturnVisitsAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.sixMonthBibleStudiesAverage))

				pioneerTable.AddCell(twelveMonthAverageLabel)
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.twelveMonthBooksAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.twelveMonthBrochuresAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.twelveMonthHoursAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.twelveMonthMagazinesAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.twelveMonthReturnVisitsAverage))
				pioneerTable.AddCell(PrettyCell(VM_Stats.PioneerTotals.twelveMonthBibleStudiesAverage))

				column.AddElement(pioneerTable)

				column.AddElement(New Paragraph(" "))

				Dim auxpioneerTable As New PdfPTable(7)
				auxpioneerTable.KeepTogether = True
				auxpioneerTable.WidthPercentage = 100

				Dim auxpioneerTitleCell As New PdfPCell(New Phrase(String.Format("Reg. Aux. Pioneers: {0}", VM_Stats.RegAuxPioneerTotals.Count), fontSectionLabel))
				auxpioneerTitleCell.Colspan = 7
				auxpioneerTable.AddCell(auxpioneerTitleCell)

				auxpioneerTable.AddCell(" ")
				auxpioneerTable.AddCell(PrettyCell("Bks."))
				auxpioneerTable.AddCell(PrettyCell("Broch."))
				auxpioneerTable.AddCell(PrettyCell("Hrs."))
				auxpioneerTable.AddCell(PrettyCell("Mag."))
				auxpioneerTable.AddCell(PrettyCell("RVs"))
				auxpioneerTable.AddCell(PrettyCell("Studies"))

				auxpioneerTable.AddCell(threeMonthAverageLabel)
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.threeMonthBooksAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.threeMonthBrochuresAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.threeMonthHoursAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.threeMonthMagazinesAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.threeMonthReturnVisitsAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.threeMonthBibleStudiesAverage))

				auxpioneerTable.AddCell(sixMonthAverageLabel)
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.sixMonthBooksAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.sixMonthBrochuresAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.sixMonthHoursAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.sixMonthMagazinesAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.sixMonthReturnVisitsAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.sixMonthBibleStudiesAverage))

				auxpioneerTable.AddCell(twelveMonthAverageLabel)
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.twelveMonthBooksAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.twelveMonthBrochuresAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.twelveMonthHoursAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.twelveMonthMagazinesAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.twelveMonthReturnVisitsAverage))
				auxpioneerTable.AddCell(PrettyCell(VM_Stats.RegAuxPioneerTotals.twelveMonthBibleStudiesAverage))

				column.AddElement(auxpioneerTable)

				column.AddElement(New Paragraph(" "))

				Dim publisherTable As New PdfPTable(7)
				publisherTable.KeepTogether = True
				publisherTable.WidthPercentage = 100

				Dim publisherTitleCell As New PdfPCell(New Phrase(String.Format("Publishers: {0}", VM_Stats.PublisherTotals.Count), fontSectionLabel))
				publisherTitleCell.Colspan = 7
				publisherTable.AddCell(publisherTitleCell)

				publisherTable.AddCell(" ")
				publisherTable.AddCell(PrettyCell("Bks."))
				publisherTable.AddCell(PrettyCell("Broch."))
				publisherTable.AddCell(PrettyCell("Hrs."))
				publisherTable.AddCell(PrettyCell("Mag."))
				publisherTable.AddCell(PrettyCell("RVs"))
				publisherTable.AddCell(PrettyCell("Studies"))

				publisherTable.AddCell(threeMonthAverageLabel)
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.threeMonthBooksAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.threeMonthBrochuresAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.threeMonthHoursAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.threeMonthMagazinesAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.threeMonthReturnVisitsAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.threeMonthBibleStudiesAverage))

				publisherTable.AddCell(sixMonthAverageLabel)
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.sixMonthBooksAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.sixMonthBrochuresAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.sixMonthHoursAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.sixMonthMagazinesAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.sixMonthReturnVisitsAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.sixMonthBibleStudiesAverage))

				publisherTable.AddCell(twelveMonthAverageLabel)
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.twelveMonthBooksAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.twelveMonthBrochuresAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.twelveMonthHoursAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.twelveMonthMagazinesAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.twelveMonthReturnVisitsAverage))
				publisherTable.AddCell(PrettyCell(VM_Stats.PublisherTotals.twelveMonthBibleStudiesAverage))

				column.AddElement(publisherTable)

				column.AddElement(New Paragraph(" "))

				Dim unbaptizedPublisherTable As New PdfPTable(7)
				unbaptizedPublisherTable.KeepTogether = True
				unbaptizedPublisherTable.WidthPercentage = 100

				Dim unbaptizedPublisherTitleCell As New PdfPCell(New Phrase(String.Format("Unbaptized Publishers: {0}", VM_Stats.UnbaptizedPublisherTotals.Count), fontSectionLabel))
				unbaptizedPublisherTitleCell.Colspan = 7
				unbaptizedPublisherTable.AddCell(unbaptizedPublisherTitleCell)

				unbaptizedPublisherTable.AddCell(" ")
				unbaptizedPublisherTable.AddCell(PrettyCell("Bks."))
				unbaptizedPublisherTable.AddCell(PrettyCell("Broch."))
				unbaptizedPublisherTable.AddCell(PrettyCell("Hrs."))
				unbaptizedPublisherTable.AddCell(PrettyCell("Mag."))
				unbaptizedPublisherTable.AddCell(PrettyCell("RVs"))
				unbaptizedPublisherTable.AddCell(PrettyCell("Studies"))

				unbaptizedPublisherTable.AddCell(threeMonthAverageLabel)
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.threeMonthBooksAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.threeMonthBrochuresAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.threeMonthHoursAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.threeMonthMagazinesAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.threeMonthReturnVisitsAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.threeMonthBibleStudiesAverage))

				unbaptizedPublisherTable.AddCell(sixMonthAverageLabel)
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.sixMonthBooksAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.sixMonthBrochuresAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.sixMonthHoursAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.sixMonthMagazinesAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.sixMonthReturnVisitsAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.sixMonthBibleStudiesAverage))

				unbaptizedPublisherTable.AddCell(twelveMonthAverageLabel)
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.twelveMonthBooksAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.twelveMonthBrochuresAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.twelveMonthHoursAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.twelveMonthMagazinesAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.twelveMonthReturnVisitsAverage))
				unbaptizedPublisherTable.AddCell(PrettyCell(VM_Stats.UnbaptizedPublisherTotals.twelveMonthBibleStudiesAverage))

				column.AddElement(unbaptizedPublisherTable)

				column.AddElement(New Paragraph(" "))

				Dim congregationPublisherTable As New PdfPTable(7)
				congregationPublisherTable.KeepTogether = True
				congregationPublisherTable.WidthPercentage = 100

				Dim congregationPublisherTitleCell As New PdfPCell(New Phrase(String.Format("Congregation Publishers: {0}", VM_Stats.CongregationTotals.Count), fontSectionLabel))
				congregationPublisherTitleCell.Colspan = 7
				congregationPublisherTable.AddCell(congregationPublisherTitleCell)

				congregationPublisherTable.AddCell(" ")
				congregationPublisherTable.AddCell(PrettyCell("Bks."))
				congregationPublisherTable.AddCell(PrettyCell("Broch."))
				congregationPublisherTable.AddCell(PrettyCell("Hrs."))
				congregationPublisherTable.AddCell(PrettyCell("Mag."))
				congregationPublisherTable.AddCell(PrettyCell("RVs"))
				congregationPublisherTable.AddCell(PrettyCell("Studies"))

				congregationPublisherTable.AddCell(threeMonthAverageLabel)
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.threeMonthBooksAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.threeMonthBrochuresAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.threeMonthHoursAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.threeMonthMagazinesAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.threeMonthReturnVisitsAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.threeMonthBibleStudiesAverage))

				congregationPublisherTable.AddCell(sixMonthAverageLabel)
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.sixMonthBooksAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.sixMonthBrochuresAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.sixMonthHoursAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.sixMonthMagazinesAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.sixMonthReturnVisitsAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.sixMonthBibleStudiesAverage))

				congregationPublisherTable.AddCell(twelveMonthAverageLabel)
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.twelveMonthBooksAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.twelveMonthBrochuresAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.twelveMonthHoursAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.twelveMonthMagazinesAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.twelveMonthReturnVisitsAverage))
				congregationPublisherTable.AddCell(PrettyCell(VM_Stats.CongregationTotals.twelveMonthBibleStudiesAverage))

				column.AddElement(congregationPublisherTable)

			End Using
		End Using

		Return OutputFile
	End Function
End Class
